//
//  SSSRecordOrderToPayCell.m
//  SSSMerchant
//
//  Created by 谢曦 on 2017/3/22.
//  Copyright © 2017年 xnxin. All rights reserved.
//

#import "SSSRecordOrderToPayCell.h"
@interface SSSRecordOrderToPayCell()
@property (weak, nonatomic) IBOutlet UILabel *dateLable;
@property (weak, nonatomic) IBOutlet UILabel *timeLable;
@property (weak, nonatomic) IBOutlet UILabel *uploadTypeLable;
@property (weak, nonatomic) IBOutlet UILabel *nameLable;
@property (weak, nonatomic) IBOutlet UILabel *phoneLable;
@property (weak, nonatomic) IBOutlet UILabel *ratioLable;
@property (weak, nonatomic) IBOutlet UILabel *totalMoneyLable;
@property (weak, nonatomic) IBOutlet UILabel *totalUploadMoney;
@property (weak, nonatomic) IBOutlet UIImageView *uploadTypeImageView;
@property (weak, nonatomic) IBOutlet UIButton *selectButton;
@end
@implementation SSSRecordOrderToPayCell

-(void)awakeFromNib{
    [super awakeFromNib];
    self.backgroundColor=[UIColor clearColor];

}
- (IBAction)selectButtonClick:(UIButton *)button {
    
//    _selectButton.selected=!button.selected;
//    _model.selected=_selectButton.selected;
    _SSSRecordOrderToPayCellSelectBlock?_SSSRecordOrderToPayCellSelectBlock(button):nil;
    
    
}
-(void)setModel:(SSSRecordOrderModel *)model{
    _model=model;
    _dateLable.text=model.date;
    _timeLable.text=model.time;
    _uploadTypeLable.text=model.type==1?@"用户上传":@"扫码上传";
    _uploadTypeImageView.image=model.type==1?[UIImage imageNamed:@"icon_currentintegral"]:[UIImage imageNamed:@"icon_cumtrapz"];
     _totalMoneyLable.text=[NSString stringWithFormat:@"¥ %@",model.money];
    _totalUploadMoney.text=[NSString stringWithFormat:@"¥ %@",model.uploadMoney];
    _phoneLable.text=model.phone;
    _nameLable.text=model.name;
    _ratioLable.text=model.ratio;
     _selectButton.selected=model.selected;
}
-(void)setCellSelected:(BOOL)cellSelected{
    _cellSelected=cellSelected;
    _selectButton.selected=cellSelected;
     _model.selected=_selectButton.selected;

}
@end
